import javax.servlet.*;
import java.io.IOException;
import java.io.PrintWriter;

public class A implements Servlet {

    public void init(ServletConfig config) throws ServletException {
        System.out.println("A init");
    }

    public void service(ServletRequest request, ServletResponse response)
            throws ServletException, IOException {
        System.out.println("A from service");
        PrintWriter print = response.getWriter();
        print.println("HTTP/1.1 200 OK");
        print.println("Content-Type: text/html; charset=utf-8");
        print.println("Content-length: " + 600);
        print.println();
        print.println("Hello. Roses are red.");
        print.println("Violets are blue.");
    }

    public void destroy() {
        System.out.println("destroy");
    }

    public String getServletInfo() {
        return null;
    }
    public ServletConfig getServletConfig() {
        return null;
    }

}
